

package top.continew.admin.question.user.service.question.entity;

import top.continew.admin.question.user.service.question.enums.ProblemStateEnum;
import top.continew.admin.question.user.service.question.enums.QuestionTypeEnum;

public class ShortAnswerQuestion extends AbstractQuestion {
    @Override
    public CorrectResult correct(String userAnswer) {
        CorrectResult correctResult = new CorrectResult();
        correctResult.setCorrectAnswer(answer);
        correctResult.setUserAnswer(userAnswer);
        correctResult.setProblemState(ProblemStateEnum.UNCHECK.getCode());
        return correctResult;
    }

    @Override
    public Integer getType() {
        return QuestionTypeEnum.SHORT_ANSWER_QUESTIONS.getCode();
    }

    @Override
    public String getTypeName() {
        return QuestionTypeEnum.SHORT_ANSWER_QUESTIONS.getName();
    }
}